import React from 'react'

export default function List(props) {
  return (
    <>
      <h1>这是list组件</h1>
      <ul>
        {props.list.map((item, index) => {
          return <li key={index}>{item}</li>
        })}
      </ul>
      <button
        onClick={() => {
          props.push('c')
        }}
      >
        按钮
      </button>
    </>
  )
}
